package com.etl.controller;


import com.etl.util.ResponseUtil;
import com.etl.util.ResultVO;
import com.etl.constants.UserSession;
import com.etl.model.rev.LoginUser;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/user")
@Api(tags = "用户管理", value = "用户相关接口")
public class UserController {

    @GetMapping("/getUserInfo")
    @ApiOperation(value = "获取登录用户信息")
    public ResultVO<LoginUser> getUserInfo() throws Exception {
        LoginUser user = UserSession.getUser();
        return ResponseUtil.success(user);
    }


}
